<?php

/**
 * 安心站长axzz.cn，一个追求技术创造者。让网站、小程序、APP、应用程序牛起来……
 *
 * cighsen02 365182575
 * 
 * Create at: 2022.05.05
 * Update at: 2025.08.31
 */

namespace Twoir\System\Model;

use Twoir\System\Support\BothTrait;
use Twoir\System\Support\ParseTrait;

/**
 * 双表(主副表)型 栏目表  帝国8.0版本专用
 */
class EnewsClass
{
    use BothTrait, ParseTrait;

    const TABLE = [
        'pri'	=> 'enewsclass',	// 主表
        'sec'	=> 'enewsclassadd'	// 副表
    ];

    // 主键字段
    const PRIMARY = 'classid';

    const FIELD = [
        'pri'	=> [
            'classid','bclassid','classname','sonclass','is_zt','lencord','link_num','newstempid','onclick','listtempid','featherclass','islast','classpath','classtype','newspath','filename',
            'filetype','openpl','openadd','newline','hotline','goodline','classurl','groupid','myorder','filename_qz','hotplline','modid','checked','firstline','bname','islist','searchtempid','tid',
            'tbname','maxnum','checkpl','down_num','online_num','listorder','reorder','intro','classimg','jstempid','addinfofen','listdt','showclass','showdt','checkqadd','qaddlist','qaddgroupid',
            'qaddshowkey','adminqinfo','doctime','classpagekey','dtlisttempid','classtempid','nreclass','nreinfo','nrejs','nottobq','ipath','addreinfo','haddlist','sametitle','definfovoteid','wburl',
            'qeditchecked','wapstyleid','repreinfo','pltempid','cgroupid','yhid','wfid','cgtoinfo','bdinfoid','repagenum','keycid','allinfos','infos','addtime','oneinfo','addsql','wapislist','fclast',
            'ecmsvpf'

            // 自定义
        ],
        'sec'	=> [
            'classid', 'classtext', 'ttids', 'eclasspagetext'

            // 自定义
        ]
    ];

    /**
     * 默认值， null为自动增加字段
     */
    const MYDEFAULT = [
        'pri'	=> [
            'classid'		=> null,
            'bclassid'		=> 0,
            'classname'		=> '',
            'sonclass'		=> '',
            'is_zt'			=> 0,
            'lencord'		=> 0,
            'link_num'		=> 0,
            'newstempid'	=> 0,
            'onclick'		=> 0,
            'listtempid'	=> 0,
            'featherclass'	=> '',
            'islast'		=> 0,
            'classpath'		=> '',
            'classtype'		=> '',
            'newspath'		=> '',
            'filename'		=> 0,
            'filetype'		=> '',
            'openpl'		=> 0,
            'openadd'		=> 0,
            'newline'		=> 0,
            'hotline'		=> 0,
            'goodline'		=> 0,
            'classurl'		=> '',
            'groupid'		=> 0,
            'myorder'		=> 0,
            'filename_qz'	=> '',
            'hotplline'		=> 0,
            'modid'			=> 0,
            'checked'		=> 0,
            'firstline'		=> 0,
            'bname'			=> '',
            'islist'		=> 0,
            'searchtempid'	=> 0,
            'tid'			=> 0,
            'tbname'		=> '',
            'maxnum'		=> 0,
            'checkpl'		=> 0,
            'down_num'		=> 0,
            'online_num'	=> 0,
            'listorder'		=> '',
            'reorder'		=> '',
            'intro'			=> '',
            'classimg'		=> '',
            'jstempid'		=> 0,
            'addinfofen'	=> 0,
            'listdt'		=> 0,
            'showclass'		=> 0,
            'showdt'		=> 0,
            'checkqadd'		=> 0,
            'qaddlist'		=> 0,
            'qaddgroupid'	=> '',
            'qaddshowkey'	=> 0,
            'adminqinfo'	=> 0,
            'doctime'		=> 0,
            'classpagekey'	=> '',
            'dtlisttempid'	=> 0,
            'classtempid'	=> 0,
            'nreclass'		=> 0,
            'nreinfo'		=> 0,
            'nrejs'			=> 0,
            'nottobq'		=> 0,
            'ipath'			=> '',
            'addreinfo'		=> 0,
            'haddlist'		=> 0,
            'sametitle'		=> 0,
            'definfovoteid'	=> 0,
            'wburl'			=> '',
            'qeditchecked'	=> 0,
            'wapstyleid'	=> 0,
            'repreinfo'		=> 0,
            'pltempid'		=> 0,
            'cgroupid'		=> 0,
            'yhid'			=> 0,
            'wfid'			=> 0,
            'cgtoinfo'		=> 0,
            'bdinfoid'		=> '',
            'repagenum'		=> 0,
            'keycid'		=> 0,
            'allinfos'		=> 0,
            'infos'			=> 0,
            'addtime'		=> 0,
            'oneinfo'		=> 0,
            'addsql'		=> '',
            'wapislist'		=> 0,
            'fclast'		=> 0,
            'ecmsvpf'		=> ''

            // 自定义
        ],
        'sec'	=> [
            'classid'		=> null,
            'classtext'		=> '',
            'ttids'			=> '',
            'eclasspagetext'=> ''

            // 自定义
        ]
    ];

    // 执行mysql置后
    protected static $low_priority = false;
}
